package org.csmz2333;

import java.util.Scanner;

public class 四月七日习题1 {
    public  static void main(String[] args){
        Scanner scanner =new Scanner(System.in);
        System.out.print("请输入一个数：");
        int num=scanner.nextInt();
        if(num<100||num>999){
            System.out.println(num+"不是三位数，不是水仙花数");
            return;
        }
        int hundreds = num/100;
        int tens =(num/10)%10;
        int units=num %10;
        if(hundreds*hundreds*hundreds+tens*tens*tens+units*units*units==num){
            System.out.println(num+"是水仙花");
        }else {
            System.out.println(num+"不是水仙花");
        }
    }
}
